﻿using System;
using System.Web.UI.WebControls;
using Journal.Common.Objects.Enums;
using Journal.Domain.Models;

namespace Journal.Front.Presentation.Models.UserModels
{
    public class UserModel
    {
        public UserModel(User user)
        {
            Id = user.Id;
            Login = user.Login;
            Email = user.Email;
            DateBirth = user.UserInfo.DateBirth;
            FullName = string.Concat(user.UserInfo.Surname, " ", user.UserInfo.Name);
            Additionally = user.UserInfo.Additionally;
            Phone = user.UserInfo.Phone;
        }

        public int Id { get; set; }

        public string Login { get; set; }

        public string Email { get; set; }

        public DateTime DateBirth { get; set; }

        public string FullName { get; set; }

        public string Additionally { get; set; }

        public string Phone { get; set; }
    }
}